package com.colorful.insuranceproject.base;

import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.support.v4.content.ContextCompat;
import android.view.ViewGroup;
import android.widget.TextView;

import com.colorful.insuranceproject.R;

/**
 * Created by john on 2016/8/2.
 *
 *    继承来自common包的方法
 */
public abstract class SendVerifyCodeActivity extends com.lovely3x.loginandresgiter.SendVerifyCodeActivity{

    @Override
    protected void addTitleHeader(ViewGroup titleContainer) {
        super.addTitleHeader(titleContainer);
        getTitleContainer().setBackgroundColor(getColor(R.color.colorPrimary, true));
        getTvTitle().setTextColor(getColor(R.color.white, true));
        getIvBack().setImageResource(R.drawable.icon_back_bule);
        Drawable draw = ContextCompat.getDrawable(mActivity,R.drawable.icon_back_white);
        draw.setBounds(0, 0, draw.getMinimumWidth(), draw.getMinimumHeight());
        getTvback().setCompoundDrawables(draw, null, null, null);
        getTvback().setTextColor(getColor(R.color.white, true));
    }



    public TextView addRightBtn(String text, int id) {
        TextView tv = super.addRightBtn(text, id);
        tv.setTextColor(getColor(R.color.white, true));
        tv.setTextSize(13);
        return tv;
    }
}
